<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>过滤器</title>
    <script src="../../../vue.js"></script>
<!--    <script src="../../../vue-2.0.js"></script>-->
</head>
<body>
<div id="box">
<!--    大写  小写   首字母大写 ·-->
    <h1>{{name|uppercase|lowercase|capitalize}}</h1>
<!-- 货币    -->
<!--currency 参数为{String}[货币符号] ,{Number} [小数位]，将数字转化成货币符号，并且会自动添加数字分节号-->
    <h1>{{1000|currency '$' 4}}</h1>
<!-- 字符串复数话  -->
<!--    <p v-for="c in count">{{c|pluralize 'item'}}</p>-->
<p v-for="c in count">{{ c | pluralize 'item' }} {{ c | pluralize 'st' 'nd' 'rd' 'th' }}</p>

<!--&lt;!&ndash;    json格式&ndash;&gt;-->
<!--    {{{1:[1,2,3,4]|json}}-->

<!--  debounce 事件延迟    -->
<!--    <input v-on:keyup ="onKeyup">-->
<!--    <h1 v-on:click="onkeyup | debounce 500 ">123456</h1>-->
<!--    <h1 v-on:click="onKeyup | debounce 500">123456</h1>-->

</div>
<script>
    var vm = new Vue({
        el:'#box',
        data:{
            name:'hao',
            count:[1,2,3,4,5,6,7,8]
        },
        methods:{
            'onkeyup':function () {
                alert(1);
            }
        }

    })
</script>
</body>
</html>